
function get_message(label)
{ 
  var language = $('#lang_js').val();
  var username = $('#pick-username').val();
  var usernameita = "Lo username ("+username+") &egrave gi&agrave; in uso."
  var usernameeng = "Sorry, the username ("+username+") has already been taken."
  
  var ita = { 
  
    "invalidmail" : "Formato email non valido.", 
    "invalidmail2" : "Inserire un email valida.",
    "invalidusername" : usernameita,
    "invalidusername2" : "Scegliere un altro username.",
    "invalidmatchpassw" : "La password non corrisponde a quella inserita.",
   
    "required":"Il campo non può essere vuoto", 
    "minlength":"Prego iserire almeno 5 caratteri.",
    "invalidmatchpassw2" : "Riprovare."
    
    };
  
  var eng = { 
  
   "invalidmail" : "The email address you provided is invalid.", 
   "invalidmail2" : "Please make sure you've entered a valid email adress and try again.",
   "invalidusername" : usernameeng,
   "invalidusername2" : "Please pick another user name.",
   "invalidmatchpassw" : "The password doesn't match your confirmation.",
    "required":"This field is required.", 
   "minlength":"Please enter at least 5 characters.",
   "invalidmatchpassw2" : "Please try again."
   
  };
  
  var message = "";
  
  if(language == "ita"){
    message = ita[label];
  }
  
  if(language == "eng"){ 
    message = eng[label];
    }
  
  return message;
}  
  
